home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / BASIC / LIB / EVENTSHELL / DOCS / Calendar < prev    next >
Text File  |  1996-04-11  |  4KB  |  187 lines

  1. This extension library should be installed using the
  2. LIBRARY command and initialised with a call to
  3. FN_shell_CalLib_Init. This call must be made AFTER
  4. PROCshell_Init has been called.
  5.  
  6. This library contains several routines related to the
  7. calendar. In all cases months are numbered from 1 to 12
  8. (1 = January, etc.) and years are the full A.D. year,
  9. (eg. 1993, etc.).     
  10.  
  11. --------------------------------------------------------
  12.  
  13. PROCshell_CalenderSetMonthString()
  14. =>    str    a 36 character string of 3 letter
  15.          month names, i.e. "JanFebMarApr
  16.          MayJunJulAugSepOctNovDec"
  17.  
  18. This call is provided so that you can set the
  19. language of the returned month strings from the
  20. other routines. For example a German version of
  21. your software would set the string to be "JanFeb
  22. MärAprMaiJunJulAugSepOktNovDez".
  23.  
  24. Ideally the string would be read from a message
  25. file so that it can easily be translated together
  26. with the other messages.
  27.  
  28. Installing the library with FN_shell_CalLib_Init
  29. sets the string to English by default.
  30.  
  31. An error will be generated if the specified
  32. string is not 36 characters long.
  33.  
  34. --------------------------------------------------------
  35.  
  36. PROCshell_CalendarSetDayString()
  37. =>    str    a 21 character string of 3 letter
  38.          day names, i.e. "SunMonTueWedThuFriSat"
  39.  
  40. This call is provided so that you can set the
  41. language of the returned day strings from the
  42. other routines. Ideally the string would be
  43. read from a message file so that it can easily
  44. be translated together with the other messages.
  45.  
  46. The call to FN_shell_CalLib_Init sets the
  47. string to English by default.
  48.  
  49. An error will be generated if the specified
  50. string is not 21 characters long.
  51.  
  52. --------------------------------------------------------
  53.  
  54. PROCshell_CalenderGetTodaysDate()
  55. =>    int    day
  56.     int    month
  57.     int    year
  58.  
  59. <=    int    day updated
  60.     int    month updated
  61.     int    year updated
  62.  
  63. Updates the given variables with the
  64. current date, taken from TIME$ (will
  65. fail if format of TIME$ is not default
  66. English!)
  67.  
  68. --------------------------------------------------------
  69.  
  70. FNshell_CalenderDayOfWeek()
  71. =>    int    date
  72.     int    month nr
  73.     int    year
  74.  
  75. <=    int    day nr (1 = Sun, 2 =
  76.          Mon, etc.
  77.  
  78. Returns the day of the week for a given
  79. date.
  80.  
  81. --------------------------------------------------------
  82.  
  83. FNshell_CalenderWeekDayString()
  84. =>    int    day nr (1-7)
  85.  
  86. <=    str    three letter version of
  87.          a day of the week (1 ->
  88.          "Sun", 2 -> "Mon" etc.
  89.  
  90. Returns "***" if day nr was out of range.
  91.  
  92. --------------------------------------------------------
  93.  
  94. FNshell_CalenderMonthString()
  95. =>    int    month nr (1-12)
  96.  
  97. <=    str    three letter version of
  98.          a month (1 -> "Jan",
  99.          2 -> "Feb", etc.)
  100.  
  101. Returns "***" if month nr was out of range.
  102.  
  103. --------------------------------------------------------
  104.  
  105. FNshell_CalenderMonthNumber()
  106. =>    str    three letter version of
  107.          a month. i.e. "Jan"
  108.  
  109. <=    int    month nr (1-12)
  110.  
  111. --------------------------------------------------------
  112.  
  113. FNshell_CalenderDateString()
  114. =>    int    day
  115.     int    month nr
  116.     int    year
  117.  
  118. <=    str    date, i.e "Fri 18th
  119.          Oct 1991"
  120.  
  121. --------------------------------------------------------
  122.  
  123. FNshell_CalenderDateValid()
  124. =>    int    day
  125.     int    month
  126.     int    year
  127.  
  128. <=    bool    TRUE  date is valid
  129.          FALSE date is not valid
  130.  
  131. --------------------------------------------------------
  132.  
  133. FNshell_CalenderDaysInMonth()
  134. =>    int    month nr (1-12)
  135.     int    year
  136.          
  137. <=    int    nr of days in month
  138.  
  139. Leap years are taken into account.
  140.  
  141. --------------------------------------------------------
  142.  
  143. FNshell_CalenderDaysInYear()
  144. =>    int    year
  145.  
  146. <=    int nr of days
  147.  
  148. Leap years are taken into account.
  149.  
  150. --------------------------------------------------------
  151.  
  152. FNshell_CalenderLeapYear()
  153. =>    int    year
  154.  
  155. <=    bool    TRUE  year is a leap year
  156.          FALSE year is not a leap year
  157.               
  158. --------------------------------------------------------
  159.  
  160. FNshell_CalenderDayOfYear()
  161. =>    int    day
  162.     int    month
  163.     int    year
  164.  
  165. <=    int    day of year
  166.  
  167. --------------------------------------------------------
  168.  
  169. FNshell_CalenderDaysBetween()
  170. =>    int    day      (1st date)
  171.     int    month    (1st date)
  172.     int    year     (1st date)
  173.     int    day      (2nd date)
  174.     int    month    (2nd date)
  175.     int    year     (2nd date)
  176.  
  177. <=    int    nr of days between dates
  178.  
  179. --------------------------------------------------------
  180.  
  181. FN_shell_CalLib_Init
  182. =>    None
  183.  
  184. <=    bool    TRUE if module initialised correctly
  185.          FALSE otherwise
  186.  
  187. -------------------------------------------------------